<div class="header">
    <nav class="navbar navbar-inverse navbar-fixed-top navbar-default">
      <div class="container">
        <div class="navbar-header" id="navbar-header" data-turbolinks-permanent="">
          <a href="/" class="navbar-brand"><img src="/img/logo.png"></a>
        </div>

        <div id="main-nav-menu">
            <ul class="nav navbar-nav">
                <li {{ set_active('/') | raw }}><a href=""><i class="octicon octicon-home"></i> {{ trans('gitamin.home') }}</a></li>
                <li {{ set_active('explore') | raw }}><a href="{{ route('explore') }}"><i class="octicon octicon-list-unordered"></i> {{ trans('gitamin.explore') }}</a></li>
                <li><a href="{{ route('refresh') }}"><i class="octicon octicon-sync"></i> Refresh</a></li>
                <li><a href="http://hifone.com/"><i class="octicon octicon-comment-discussion"></i> Community</a></li>
            </ul>
        </div>

      <ul class="nav user-bar navbar-nav navbar-right">
      {% if current_user %}
      <li class="dropdown">
        <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false"> {{ current_user.username }} <span class="caret"></span></a>
        <button class="navbar-toggle" type="button" data-toggle="dropdown" role="button" aria-expanded="false">
          <span class="sr-only">Toggle</span>
          <i class="fa fa-reorder"></i>
        </button>
        <ul class="dropdown-menu" role="menu"><li class=""><a href="/u/{{ current_user.username }}">我的主页</a></li><li class=""><div class="divider"></div></li><li class=""><a href="/account/edit">个人资料设置</a></li><li class=""><div class="divider"></div></li><li class=""><a rel="nofollow" data-method="delete" href="/auth/logout">退出</a></li></ul>
      </li>
      {% else %}
      <li><a href="/auth/register">注册</a></li>
      <li><a href="/auth/login">登录</a></li>
      {% endif %}
      </ul>
        <ul class="nav navbar-nav navbar-right">
          <li class="nav-search hidden-xs hidden-sm">
            <form class="navbar-form form-search active" action="/search" method="GET">
              <i class="octicon octicon-search"></i>
              <div class="form-group">
                <input class="form-control" name="q" type="text" value="" placeholder="搜索本站内容">
              </div>
            </form>
          </li>
          {% if current_user %}
          <li class="notification-count">
            <a href="/notifications" class="" title="通知"><i class="fa fa-bell"></i><span class="count"></span></a>
          </li>
          {% endif %}
        </ul>
      </div>
    </nav>
  </div>
